<% form_for @trip, :url => {:action => "update"}, :html => {:class => "wufoo topLabel page"} do |f| %>
<%= f.error_messages %>
	<div class="info"> 
		<h2>Editar Viaje</h2>
		<h3><%= @trip.tri_country + " - "+ @trip.tri_city %></h3>
	</div>

	<li id="foli1" 		class="     ">
		<label class="desc" id="title1" for="iti_start_date">
			Fecha
		<span id="req_1" class="req">*</span>
		</label>
			<script> 
			$(function() {
				var dates = $( "#tri_start_date, #tri_end_date" ).datepicker({
					showOn: 'button',
					buttonImageOnly: true,
					buttonImage: '/images/calendar.png',
					minDate: new Date(),
					defaultDate: "+1w",
					changeMonth: true,
					numberOfMonths: 1,
					onSelect: function( selectedDate ) {
						var option = this.id == "tri_start_date" ? "minDate" : "maxDate",
							instance = $( this ).data( "datepicker" );
							date = $.datepicker.parseDate(
								instance.settings.dateFormat ||
								$.datepicker._defaults.dateFormat,
								selectedDate, instance.settings );
						dates.not( this ).datepicker( "option", option, date );
					}
				});
			});
		</script>
		<span>
			<%= f.text_field :tri_start_date, :id => "tri_start_date", :class => "field text", :size => "20", :tabindex => "1"%>
			<label for="tri_start_date">Fecha de Partida</label>
		</span>
		<span>
			<%= f.text_field :tri_end_date, :id => "tri_end_date", :class => "field text", :size => "20", :tabindex => "2"%>
			<label for="tri_end_date">Fecha de Regreso</label>
		</span>
	</li>
	
	<li id="foli1" 		class="     ">
		<label class="desc" id="title1" for="tri_lodging">
			Sitio de Alojamiento
		<span id="req_1" class="req">*</span>
		</label>
		<span>
			<%= f.text_field :tri_lodging, :class => "field text", :size => 45, :tabindex => "3"%>			
		</span>
	</li>
	
	<li id="foli1" 		class="     ">
		<label class="desc" id="title1" for="tri_shared">
			Compartir el viaje <%= f.check_box("tri_shared",{:tabindex=> 4},"1","0")%>	
		</label>	
	</li>
	
	<div>			
		<%= link_to "Cancelar", :controller => "trips", :action => "show", :id => @trip.id%> | <%= submit_tag "Editar" %>
	</div>
	<%= f.hidden_field :tri_status, :value => "1"%>
	
	<%= f.hidden_field :user_id, :value => current_user.id%>
<% end -%>